package com.mingqijia.gassafety.shared.constant;


import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Getter
@RequiredArgsConstructor
public enum EquipmentStatusEnum {
//       public static final int offline = 0;
//    public static final int normal = 1;
//    public static final int lowAlert = 2;
//    public static final int highAlert = 3;
//    public static final int broken = 4;
//    //屏蔽
//    public static final int sheild = 5;
//    //紫荆WiFi报警器报警
//    public static final int alert = 6;
STATUS_0(0,"离线"),
    STATUS_1(1,"正常"),
    STATUS_2(2,"低报"),
    STATUS_3(3,"高报"),
    STATUS_4(4,"故障"),
    STATUS_5(5,"屏蔽"),
    STATUS_6(6,"报警");
    private final Integer status;
    private final String name;

    public static String getEquipmentStatusMsg(Integer status){
        for (EquipmentStatusEnum statusEnum : EquipmentStatusEnum.values()) {
            if (statusEnum.status.equals(status)) {
                return statusEnum.name;
            }
        }
        return "";
    }
}
